<template>
	<view class="indexBox">
		<go-top :scrollTop="scrollTop"></go-top>
		<!-- 富文本 -->
		<uParse :content="article" ></uParse>
	</view>
</template>

<script>
	var _this,shak;
	export default {
		data() {
			return {
				// 回到头部按钮距离
				scrollTop: 0,
				article:"",
			}
		},
		onLoad(options) {
			_this = this
			_this.getdata()
		},
		//监听页面滚动
		onPageScroll(res) {
			this.scrollTop = res.scrollTop
		},
		// 下拉刷新
		onPullDownRefresh: function() {
			_this.getdata()
		},
		methods: {
			// 获取数据
			getdata() {
				_this.$api.get("", {}).then(data => {
					_this.list = data
				});
			},
			
			// 防抖点击
			click_shake(fn){
				if(!_this.shake){
					fn && typeof fn === 'function' && fn()
					_this.shake=true
					setTimeout(function(){
						_this.shake=false
					},500)
				}
			},
		}
	}
</script>

<style lang="scss" scoped>

</style>
